# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import os
from uoco import settings


class UocoPipeline(object):
    def __init__(self):
        if os.path.exists(settings.IMAGES_STORE) == False:
            os.mkdir(settings.IMAGES_STORE)

    def process_item(self, item, spider):
        return item


class SaveImgPipeline(object):
    def process_item(self, item, spider):
        return item
